<!--
 * @FileDescription 判断框
 * @Author lz
 * @Date 20230131 15:15:55
 * @LastEditors lz
 * @LastEditTime 20230131 15:15:55
-->
<template>
    <div class="contentBoxWp" v-if="state.show">
        <div class="contentBox">
            <div class="content">
                <div class="txt">{{ props.Questions }}</div>
                <a-button class="correct Btn" @click="choice(1)">确定</a-button>
                <!-- <div class="error Btn" @click="choice(2)">取消</div> -->
            </div>
        </div>
</div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

import { reactive, ref, toRefs, onBeforeMount, onMounted, onBeforeUpdate, onUpdated, onUnmounted } from 'vue'
import { ClientMessage } from '@runtime/generate/message/ClientMessage';
import WebSocketComponent from '@runtime/module/WebSocket/WebSocketComponent';
interface Props {
    Questions: any;
    messageType: number;
}
const props = defineProps<Props>();
const emit = defineEmits(["doSth"]);
const state = reactive({
    show: false,
});
async function choice(val: number) {
    //关闭
    WebSocketComponent.Default.PostMessage(new ClientMessage.ShutdownMessage());
}
function showModel(val: any) {
    state.show = true
}
defineExpose({ showModel })
</script>

<style scoped>
.contentBoxWp {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99999;
}

.content {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%);
    width: 600px;
    height: 311px;
    padding: 40px;
    background-color: #fff;
    border-radius: 10px;
}

.txt {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-top: 60px;
    color: #000;
}

.Btn {
    position: absolute;
    font-size: 18px;
    text-align: center;
    font-weight: bold;
    width: 120px;
    height: 54px;
    border-radius: 6px;
}
.correct {
    left: 50%;
    transform: translate(-50%,0);
    bottom: 40px;
}

.error {
    right: 130px;
    bottom: 40px;
}
</style>